package com.nuanshui.heatedloan.module.modules;

import org.apache.commons.lang3.StringUtils;

import com.alibaba.fastjson.JSON;
import com.nuanshui.heatedloan.module.model.ModuleIdConstant;
import com.nuanshui.heatedloan.module.constant.ConstantModule;
import com.nuanshui.heatedloan.module.model.FeatureExtItemModel;
import com.nuanshui.heatedloan.module.model.FeatureItem;

public class FeatueExtItemParser {

	public static FeatureExtItemModel parseData(int featureId,FeatureItem item)
	{
		FeatureExtItemModel model=null;
		if(StringUtils.isEmpty(item.getServerData()))
			return model;
		if(featureId==ConstantModule.MODULE_ICON)
		{
			String date=item.getServerData();
			model=JSON.parseObject(item.getServerData(),FeatureExtItemModel.class);
		}
		/*else if(featureId== ConstantModule.MODULE_ELITEPOST) {
			model=JSON.parseObject(item.getServerData(),FeatureExtItemModel.class);
		}
		else if(featureId== ConstantModule.MODULE_ARTICLE) {
			model=JSON.parseObject(item.getServerData(),FeatureExtItemModel.class);
		}
		else if(featureId== ConstantModule.MODULE_HOTTAG) {
			model=JSON.parseObject(item.getServerData(),FeatureExtItemModel.class);
		}*/
		return model;
	}
	
	public static void main(String[] args) {
		FeatureExtItemModel model=null;
		String date="['auth':1,'isJump':2]";
		model=JSON.parseObject(date,FeatureExtItemModel.class);
		System.out.println(1111);
	}
}
